package day5;

public class Demo1 {

    public static void main(String[] args) {
        double a = 1;
        double b = 2;
        Cal cal = new Cal();
        System.out.println(cal.add(a, b));
        System.out.println(cal.red(a, b));
        System.out.println(cal.mul(a, b));
        System.out.println(cal.div(a, b));
        cal.say(1,2,3,4,"hahhfd", "fewf", 6.5, 9.6);
    }
}

class Cal{

    public double add(double a, double b){
        return a + b;
    }

    public double red(double a, double b){
        return a - b;
    }

    public double mul(double a, double b){
        return a * b;
    }

    public double div(double a, double b){
        return a / b;
    }

    public void say(Object...args){
        System.out.println("args.length:" + args.length);
        for (Object obj : args){
            System.out.println(obj);
        }
    }
}
